<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@include file="/WEB-INF/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>广告信息修改页面</title>
<script type="text/javascript" src="/shop/js/ad/mootools.js"></script>
<script type="text/javascript" src="/shop/js/ad/calendar.rc4.js"></script>
	<script type="text/javascript">		
	//<![CDATA[
		window.addEvent('domready', function() { 
			//myCal1 = new Calendar({ date1: 'Y/m/d' }, { direction: 1, tweak: {x: 6, y: 0} });
			myCal2 = new Calendar({ startDate: 'Y-m-d' }, { classes: ['dashboard'], direction: 1, tweak: {x: 0, y: -3} });
			//myCal3 = new Calendar({ date3: 'Y/m/d' }, { classes: ['i-heart-ny'], direction: 1, tweak: {x: 3, y: 0} });
		});
		function checkform(){
			var form = document.forms[0];
			if(form.name.value==""){
				alert("广告名称不能为空!");
				return false;
			}
			if(form.startDate.value==""){
				alert("上线时间不能为空!");
				return false;
			}
			if(form.content.value==""){
				alert("广告代码不能为空!");
				return false;
			}
			return true;
		}
	//]]>
	</script>
<link rel="stylesheet" href="/shop/css/ad/calendar.css"  type="text/css" media="screen"/>
<link rel="stylesheet" href="/shop/css/ad/dashboard.css"  type="text/css" media="screen"/>
<link rel="stylesheet" href="/shop/css/ad/i-heart-ny.css"  type="text/css" media="screen"/>
<link rel="stylesheet" href="/shop/css/ad/iframe.css"  type="text/css" media="screen"/>
</head>
<body>
	<html:form action="/control/ad/advertisement/manage" method="post">
	<html:hidden property="adId" value="${requestScope.advertisment.adId}"/>
	<html:hidden property="method" value="edit"/>
		<table>
			<tr>
				<td width="30%">广告名称:</td>
				<td><input type="text" name="name" value="${requestScope.advertisment.name }"/><c:if test="${!empty name_null}"><font color="red">${name_null}</font></c:if></td>
			</tr>
			<tr>
				<td colspan="2" >
					<fieldset>
						<legend>上线时间</legend>
						<label for="startDate"></label>
						<input id="startDate" name="startDate" type="text" value="${requestScope.advertisment.startDateStr }"/>
					</fieldset>
					<c:if test="${!empty startdate_null}"><font color="red">${startdate_null}</font></c:if>
				</td>
			</tr>
			<tr>
				<td width="30%">有效时间:</td>
				<td><input type="text" name="validTime" value="${requestScope.advertisment.validTime }"/></td>
			</tr>
			<tr>
				<td width="30%">所属模块:</td>
				<td>
					<input type="hidden" name="modulId" value="${requestScope.advertisment.module.modulId }"/>
					<input type="text" name="modulname" disabled="true" value="${requestScope.module.name }"/>  <input type="button" value="选择模块..." onclick=""/>
				</td>
			</tr>
			<tr>
				<td width="30%">所属商场:</td>
				<td>
					<input type="hidden" name="marketid" value="${requestScope.advertisment.belongToMarket.id }"/>
					<input type="text" name="modulname" disabled="true" value="${requestScope.belongToMarket.name }"/>  <input type="button" value="选择商场..." onclick=""/>
				</td>
			</tr>
			<tr>
				<td width="30%">广告代码:</td>
				<td>
					<textarea name="content" cols="20" rows="5">${requestScope.advertisment.content }</textarea><c:if test="${!empty content_null}"><font color="red">${content_null}</font></c:if>
				</td>
			</tr>
			<tr>
				<td><input type="submit" value="提交" /></td>
				<td><input type="reset" value="清空" /></td>
			</tr>
		</table>
	</html:form>
</body>
</html>